package com.xxxy.hyc.xyxmp;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.xxxy.hyc.xyxmp.activity.LoginActivity;

public class MainActivity extends AppCompatActivity {

    Button jumpButton;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });
        initView();
    }

    // 例如在 onCreate 方法中添加按钮点击事件
     // 假设你有一个按钮

    private void initView() {
        jumpButton = findViewById(R.id.btn_jump);
        jumpButton.setOnClickListener(v -> {
            // 跳转到第二个页面
            startActivity(new Intent(MainActivity.this, com.xxxy.hyc.xyxmp.activity.MainActivity.class));
        });
    }
}